<template>
    <view class="bang-grid3-image" :style="`grid-template-columns: repeat(${columns}, 1fr)`">
        <image class="image" :style="{height: height}" mode="aspectFill" v-for="(k,i) in imageList" :key="i"
               :src="k[urlName] || k" @tap.stop="previewImageHandler(i)"/>
    </view>
</template>
<script setup>
const props = defineProps({
    imageList: {
        type: Array,
        default: () => []
    },
    columns: {
        type: Number,
        default: 3
    },
    height: {
        type: String,
        default: '120rpx'
    },
    urlName:{
        type: String,
        default: ''
    }
})

const previewImageHandler = (index) => {
    qly.image.previewImage(props.imageList, index, props.urlName)
}
</script>
<style scoped lang="scss">

</style>
